package net.ccbluex.liquidbounce.features.module.modules.exploit

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.UpdateEvent
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo

/**
 * LiquidBounce Hacked Client
 * A minecraft forge injection client using Mixin
 *
 * @game Minecraft
 * @author CCBlueX
 */
@ModuleInfo(name = "BedGodMode", description = "Allows you to walk around lying in a bed. (For 1.9)", category = ModuleCategory.EXPLOIT)
class BedGodMode : Module() {

    @EventTarget
    fun onUpdate(event: UpdateEvent) {
        if (!mc.thePlayer.isPlayerSleeping)
            return

        mc.thePlayer.sleeping = false
        mc.thePlayer.sleepTimer = 0
    }
}